export tag=1.3
root:
	export ROOT=gitee.com/linxun/cncf01

build:
	echo "building httpserver binary"
	mkdir -p bin/amd64
	CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o bin/amd64/httpserver .

build-for-darwin:
	echo "building httpserver binary for darwin os"
	mkdir -p bin/amd64
	CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o bin/amd64/httpserver-for-darwin .

release: build
	echo "building httpserver container"
	docker build -t linxun/httpserver:${tag} .

push: release
	echo "pushing linxun/httpserver"
	docker push linxun/httpserver:${tag}
